<ui:composition xmlns="http://www.w3.org/1999/xhtml"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:c="http://java.sun.com/jstl/core"
     xmlns:fmt="http://java.sun.com/jstl/fmt"
     xmlns:x="http://java.sun.com/jstl/xml"
     xmlns:fn="http://java.sun.com/jstl/functions"
     xmlns:a4j="http://richfaces.org/a4j"
     xmlns:rich="http://richfaces.org/rich"
     xmlns:gape="http://componentes.gape/component/gape/tags">
     
	<rich:modalPanel id="panelSurvey" autosized="false" keepVisualState="false" width="700" height="520" headerClass="headerModal">
		<f:facet name="controls">
           <h:panelGroup id="groupPanel">
               <h:graphicImage value="/files/close.png" styleClass="hidelink" id="hidelink"/>
               <rich:componentControl for="panelSurvey" attachTo="hidelink" operation="hide" event="onclick"/>
           </h:panelGroup>
       	</f:facet>		
		<f:facet name="header">
			<h:outputText value="#{msg.tituloSurvey}" />
		</f:facet>
		<a4j:form>
			<rich:dataTable value="#{survey.questions}" var="row">
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{msg.titleColumnQuestion}" />
					</f:facet>
					<h:outputText value="#{row.question}" />
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{msg.titleColumnScore}"/>
					</f:facet>
				
					<h:selectOneRadio value="#{row.score}" style="label">
						<f:selectItems value="#{survey.listScoresSurvey}"/>
					</h:selectOneRadio>
				</rich:column>					
			</rich:dataTable>
			<h:panelGroup styleClass="FormLinhaBotoes">
				<a4j:commandButton action="#{survey.insertSurvey}" value="#{msg.buttonSave}" reRender="survey" oncomplete="javascript:Richfaces.hideModalPanel('panelSurvey');"/>
				<a4j:commandButton value="#{msg.buttonCancel}" oncomplete="javascript:Richfaces.hideModalPanel('panelSurvey');"/>
			</h:panelGroup>	
		</a4j:form>
		<h:panelGrid columns="12" columnClasses="label,label,label,label,label,label,label,label,label,label,label,label" headerClass="pathway">
			<f:facet name="header">
				<h:outputText value="#{msg.titlePanelExplainSubScoreQuestion}" />
			</f:facet>
			<h:outputText value="1" />
			<h:outputText value="#{msg.explainFaixa1ScoreQuestion}" />				
			<h:outputText value="2" />
			<h:outputText value="#{msg.explainFaixa2ScoreQuestion}" />
			<h:outputText value="3" />
			<h:outputText value="#{msg.explainFaixa3ScoreQuestion}" />
			<h:outputText value="4" />
			<h:outputText value="#{msg.explainFaixa4ScoreQuestion}" />
			<h:outputText value="5" />
			<h:outputText value="#{msg.explainFaixa5ScoreQuestion}" />				
			<h:outputText value="NA" />
			<h:outputText value="#{msg.explainFaixaNAScoreQuestion}" />				
		</h:panelGrid>			
	</rich:modalPanel>
</ui:composition>